﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Orchard.Localization;
using Orchard.UI.Navigation;

namespace AwesomeSlider
{
    public class AdminMenu : INavigationProvider
    {
        public string MenuName { get { return "admin"; } }

        public Localizer T { get; set; }

        public void GetNavigation(NavigationBuilder builder)
        {
            builder.Add(T("Awesome Slider"), "2.8", BuildMenu);
        }

        private void BuildMenu(NavigationItemBuilder menu)
        {
            menu.Add(T("Manage Sliders"), "2",
                           item => item.Action("Summary", "SlidersAdmin", new { area = "AwesomeSlider" }).Permission(Permissions.ManageSliders));
        }
    }
}